import React, { Component } from 'react';
import './App.css';
import { message } from 'antd';
import { BrowserRouter, Route, Switch} from 'react-router-dom';
import { Login } from './pages/login/login.js';
import { Admin } from './pages/admin/admin.js';


export default class App extends Component {
  handleClick = () => {
    message.success("click success");
  }
  render() {
    return (
      <BrowserRouter>
        <Switch> {/* 只匹配一个路由 */}
          <Route path="/login" component={Login}></Route>
          <Route path="/" component={Admin}></Route>
        </Switch>
      </BrowserRouter>
    )
  }
}
 